package com.example.cardserver.controller;

import com.example.cardserver.service.ex.ServiceException;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.servlet.http.HttpSession;

public class BaseController {
    public static final int OK = 200;
    public static final int ERR = 400;

    public final Integer getIdFromSession(HttpSession session) {
        return Integer.valueOf(session.getAttribute("id").toString());
    }
    public final String getPhoneFromSession(HttpSession session){
        return session.getAttribute("phone").toString();
    }
}
